package com.bjb.vr.common.mapper;

import com.bjb.vr.common.ao.ResPackageDetailAo;
import com.bjb.vr.common.ao.ResPackageDetailRemoveAo;
import com.bjb.vr.common.dto.ResBundleDetail;
import com.bjb.vr.common.vo.ResPackageDetailVo;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【res_bundle_detail(资源包详情表)】的数据库操作Mapper
* @createDate 2022-04-19 10:42:40
* @Entity com.bjb.vr.common.dto.ResBundleDetail
*/
public interface ResBundleDetailMapper extends MPJBaseMapper<ResBundleDetail> {

    List<ResPackageDetailVo> queryPackageResources(ResPackageDetailAo resPackageDetailAo);

    List<ResPackageDetailVo> queryOptPackageResources(ResPackageDetailAo resPackageDetailAo);

    Integer queryPackageResourcesSize(ResPackageDetailAo resPackageDetailAo);

    Integer queryOptPackageResourcesSize(ResPackageDetailAo resPackageDetailAo);

    Integer deleteByResBundleId(ResPackageDetailRemoveAo resPackageDetailRemoveAo);

    List<ResPackageDetailVo> selectByResBundleIdAndResIds(ResPackageDetailRemoveAo resPackageDetailRemoveAo);

    Integer sumResCapacity(ResPackageDetailRemoveAo removeAo);

//    void copyResBundleDetailFromOptProd(@Param("tenantId") String tenantId, @Param("prodBundleId") Long prodBundleId, @Param("resBundleId") Long resBundleId);

    List<ResBundleDetail> queryResBundleDetailFromOptProd(@Param("tenantId") String tenantId, @Param("prodBundleId") Long prodBundleId, @Param("resBundleId") Long resBundleId);
}




